1. Field of the Invention
This invention relates to a data storage apparatus for storing data, such as measurement data input from the outside.
2. Description of the Prior Art
Conventionally, a data storage apparatus of this kind has been proposed e.g. by Japanese Laid-Open Patent Publication (Kokai) No. H06-18293. The data storage apparatus includes an A/D converter circuit, a CPU, a ring buffer memory, and recording means. In this data storage apparatus, a process for recording measurement data is executed as follows: First, the A/D converter circuit converts a measurement data item input from the outside to a digital measurement data item. Then, the digital measurement data item is temporarily stored in the ring buffer memory, and at the same time it is determined whether or not a trigger has been generated. If no trigger has been generated, it is determined whether or not the present measurement data item stored in the ring buffer memory is within a predetermined range of values thereof. If the present measurement data item is within the predetermined range, it is recorded in the recording means on condition that the present measurement data item is a fifth one input after recording of a measurement data item in the recording means was performed on a preceding occasion, but not recorded unless it is the fifth one.
On the other hand, if the present measurement data item stored in the ring buffer memory is not within the predetermined range, the trigger is generated, and at the same time two consecutive preceding measurement data items and the present one are recorded in the recording means. Once the trigger is generated, whenever a measurement data item is input, it is transferred from the ring buffer memory to the recording means and recorded therein. Thus, in the above recording processing, measurement data items are recorded in a thinned manner before generation of the trigger, and upon generation of the trigger, three consecutive measurement data items including the present one, which were input immediately before generation of the trigger, are recorded, followed by recording every measurement data item input thereafter.
When the above conventional data storage apparatus is employed e.g. for analyzing a failure or malfunction of equipment, it can be assumed that occurrence of a failure or malfunction in the equipment is set to a condition for generating the above-mentioned trigger. In general, in analysis of a failure or malfunction of equipment, measurement data input and recorded after occurrence of the failure or malfunction is not very useful or effective, but measurement data recorded before the occurrence is very useful. Therefore, the measurement data stored before occurrence of the failure or malfunction is required to be recorded with a high density, i.e. frequently. However, the conventional data storage apparatus, in which before generation of the trigger, measurement data items are recorded in the thinned manner at a rate of one data item per five input data items, and only upon generation of the trigger, three consecutive measurement data items input immediately before the generation of the trigger are recorded, cannot provide the measurement data for analysis in an effective manner. Further, since measurement data items are continuously recorded once the trigger has been generated, if the storage capacity of the ring buffer memory is small, measurement data stored before the generation of the trigger can be lost. One possible solution to these problems is to store measurement data items at respective shorter sampling intervals and recording intervals before generation of a trigger. However, this solution makes it necessary to increase the storage capacity of the ring buffer memory, which results in an increase in costs. On the other hand, if measurement data items are recorded at regular and increased intervals before generation of a trigger, the density or frequency at which measurement data is recorded immediately before generation of the trigger becomes low.